Integrand size = 35, antiderivative size = 213 \[ \int \cos ^{\frac {9}{2}}(c+d x) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {4 a^3 (17 A+27 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {4 a^3 (11 A+21 C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {8 a^3 (16 A+21 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 A \sqrt {\cos (c+d x)} (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d}+\frac {4 A \sqrt {\cos (c+d x)} \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d}+\frac {2 (73 A+63 C) \sqrt {\cos (c+d x)} \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d} \]
[Out]
Time = 0.73 (sec) , antiderivative size = 213, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.229, Rules used = {4199, 3125, 3055, 3047, 3102, 2827, 2720, 2719} \[ \int \cos ^{\frac {9}{2}}(c+d x) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {4 a^3 (11 A+21 C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {4 a^3 (17 A+27 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {8 a^3 (16 A+21 C) \sin (c+d x) \sqrt {\cos (c+d x)}}{105 d}+\frac {2 (73 A+63 C) \sin (c+d x) \sqrt {\cos (c+d x)} \left (a^3 \cos (c+d x)+a^3\right )}{315 d}+\frac {4 A \sin (c+d x) \sqrt {\cos (c+d x)} \left (a^2 \cos (c+d x)+a^2\right )^2}{21 a d}+\frac {2 A \sin (c+d x) \sqrt {\cos (c+d x)} (a \cos (c+d x)+a)^3}{9 d} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 2827
Rule 3047
Rule 3055
Rule 3102
Rule 3125
Rule 4199
Rubi steps \begin{align*} \text {integral}& = \int \frac {(a+a \cos (c+d x))^3 \left (C+A \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx \\ & = \frac {2 A \sqrt {\cos (c+d x)} (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d}+\frac {2 \int \frac {(a+a \cos (c+d x))^3 \left (\frac {1}{2} a (A+9 C)+3 a A \cos (c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx}{9 a} \\ & = \frac {2 A \sqrt {\cos (c+d x)} (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d}+\frac {4 A \sqrt {\cos (c+d x)} \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d}+\frac {4 \int \frac {(a+a \cos (c+d x))^2 \left (\frac {1}{4} a^2 (13 A+63 C)+\frac {1}{4} a^2 (73 A+63 C) \cos (c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx}{63 a} \\ & = \frac {2 A \sqrt {\cos (c+d x)} (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d}+\frac {4 A \sqrt {\cos (c+d x)} \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d}+\frac {2 (73 A+63 C) \sqrt {\cos (c+d x)} \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d}+\frac {8 \int \frac {(a+a \cos (c+d x)) \left (\frac {3}{4} a^3 (23 A+63 C)+\frac {9}{2} a^3 (16 A+21 C) \cos (c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx}{315 a} \\ & = \frac {2 A \sqrt {\cos (c+d x)} (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d}+\frac {4 A \sqrt {\cos (c+d x)} \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d}+\frac {2 (73 A+63 C) \sqrt {\cos (c+d x)} \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d}+\frac {8 \int \frac {\frac {3}{4} a^4 (23 A+63 C)+\left (\frac {9}{2} a^4 (16 A+21 C)+\frac {3}{4} a^4 (23 A+63 C)\right ) \cos (c+d x)+\frac {9}{2} a^4 (16 A+21 C) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)}} \, dx}{315 a} \\ & = \frac {8 a^3 (16 A+21 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 A \sqrt {\cos (c+d x)} (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d}+\frac {4 A \sqrt {\cos (c+d x)} \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d}+\frac {2 (73 A+63 C) \sqrt {\cos (c+d x)} \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d}+\frac {16 \int \frac {\frac {45}{8} a^4 (11 A+21 C)+\frac {63}{8} a^4 (17 A+27 C) \cos (c+d x)}{\sqrt {\cos (c+d x)}} \, dx}{945 a} \\ & = \frac {8 a^3 (16 A+21 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 A \sqrt {\cos (c+d x)} (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d}+\frac {4 A \sqrt {\cos (c+d x)} \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d}+\frac {2 (73 A+63 C) \sqrt {\cos (c+d x)} \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d}+\frac {1}{21} \left (2 a^3 (11 A+21 C)\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx+\frac {1}{15} \left (2 a^3 (17 A+27 C)\right ) \int \sqrt {\cos (c+d x)} \, dx \\ & = \frac {4 a^3 (17 A+27 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {4 a^3 (11 A+21 C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {8 a^3 (16 A+21 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 A \sqrt {\cos (c+d x)} (a+a \cos (c+d x))^3 \sin (c+d x)}{9 d}+\frac {4 A \sqrt {\cos (c+d x)} \left (a^2+a^2 \cos (c+d x)\right )^2 \sin (c+d x)}{21 a d}+\frac {2 (73 A+63 C) \sqrt {\cos (c+d x)} \left (a^3+a^3 \cos (c+d x)\right ) \sin (c+d x)}{315 d} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 9.19 (sec) , antiderivative size = 1116, normalized size of antiderivative = 5.24 \[ \int \cos ^{\frac {9}{2}}(c+d x) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {\cos ^{\frac {11}{2}}(c+d x) \sec ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \left (-\frac {(17 A+27 C) \cot (c)}{15 d}+\frac {(97 A+84 C) \cos (d x) \sin (c)}{168 d}+\frac {(73 A+18 C) \cos (2 d x) \sin (2 c)}{360 d}+\frac {3 A \cos (3 d x) \sin (3 c)}{56 d}+\frac {A \cos (4 d x) \sin (4 c)}{144 d}+\frac {(97 A+84 C) \cos (c) \sin (d x)}{168 d}+\frac {(73 A+18 C) \cos (2 c) \sin (2 d x)}{360 d}+\frac {3 A \cos (3 c) \sin (3 d x)}{56 d}+\frac {A \cos (4 c) \sin (4 d x)}{144 d}\right )}{A+2 C+A \cos (2 c+2 d x)}-\frac {11 A \cos ^5(c+d x) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\arctan (\cot (c)))\right ) \sec ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \sec (d x-\arctan (\cot (c))) \sqrt {1-\sin (d x-\arctan (\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\arctan (\cot (c)))} \sqrt {1+\sin (d x-\arctan (\cot (c)))}}{21 d (A+2 C+A \cos (2 c+2 d x)) \sqrt {1+\cot ^2(c)}}-\frac {C \cos ^5(c+d x) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\arctan (\cot (c)))\right ) \sec ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \sec (d x-\arctan (\cot (c))) \sqrt {1-\sin (d x-\arctan (\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\arctan (\cot (c)))} \sqrt {1+\sin (d x-\arctan (\cot (c)))}}{d (A+2 C+A \cos (2 c+2 d x)) \sqrt {1+\cot ^2(c)}}-\frac {17 A \cos ^5(c+d x) \csc (c) \sec ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\arctan (\tan (c)))\right ) \sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\arctan (\tan (c)))} \sqrt {1+\cos (d x+\arctan (\tan (c)))} \sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{30 d (A+2 C+A \cos (2 c+2 d x))}-\frac {9 C \cos ^5(c+d x) \csc (c) \sec ^6\left (\frac {c}{2}+\frac {d x}{2}\right ) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\arctan (\tan (c)))\right ) \sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\arctan (\tan (c)))} \sqrt {1+\cos (d x+\arctan (\tan (c)))} \sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{10 d (A+2 C+A \cos (2 c+2 d x))} \]
[In]
[Out]
Time = 144.76 (sec) , antiderivative size = 408, normalized size of antiderivative = 1.92
method | result | size |
default | \(-\frac {4 \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, a^{3} \left (-560 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+2200 A \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-3412 A -252 C \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (2702 A +882 C \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-738 A -378 C \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+165 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-357 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+315 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-567 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{315 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(408\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.12 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.03 \[ \int \cos ^{\frac {9}{2}}(c+d x) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=-\frac {2 \, {\left (15 i \, \sqrt {2} {\left (11 \, A + 21 \, C\right )} a^{3} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 15 i \, \sqrt {2} {\left (11 \, A + 21 \, C\right )} a^{3} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 21 i \, \sqrt {2} {\left (17 \, A + 27 \, C\right )} a^{3} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 21 i \, \sqrt {2} {\left (17 \, A + 27 \, C\right )} a^{3} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - {\left (35 \, A a^{3} \cos \left (d x + c\right )^{3} + 135 \, A a^{3} \cos \left (d x + c\right )^{2} + 7 \, {\left (34 \, A + 9 \, C\right )} a^{3} \cos \left (d x + c\right ) + 15 \, {\left (22 \, A + 21 \, C\right )} a^{3}\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )\right )}}{315 \, d} \]
[In]
[Out]
Timed out. \[ \int \cos ^{\frac {9}{2}}(c+d x) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \cos ^{\frac {9}{2}}(c+d x) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \cos ^{\frac {9}{2}}(c+d x) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{3} \cos \left (d x + c\right )^{\frac {9}{2}} \,d x } \]
[In]
[Out]
Time = 18.21 (sec) , antiderivative size = 283, normalized size of antiderivative = 1.33 \[ \int \cos ^{\frac {9}{2}}(c+d x) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {A\,a^3\,\left (\frac {2\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )}{3}+\frac {2\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{3}\right )}{d}+\frac {6\,C\,a^3\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {4\,C\,a^3\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,C\,a^3\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )}{d}-\frac {6\,A\,a^3\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,A\,a^3\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,A\,a^3\,{\cos \left (c+d\,x\right )}^{11/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {11}{4};\ \frac {15}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{11\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,C\,a^3\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \]
[In]
[Out]